package org.bee.enums;

import org.bee.annotation.EnumsDict;

/**
 * 任务失败处理策略
 */
@EnumsDict(value = "jobErrorProcessType", desc = "任务异常后策略")
public enum JobErrorProcessType implements IEnum{
    MISFIRE_DEFAULT("0","默认"),
    MISFIRE_IGNORE_MISFIRES("-1","忽略异常期间错过的触发点,立即执行一次补偿所有"),
    MISFIRE_FIRE_AND_PROCEED("1","立即触发一次执行,然后继续按照正常的调度计划执行"),
    MISFIRE_DO_NOTHING("2","错过的就错过了，等待下次正常执行");
    ;
    private final String code;
    private final String desc;

    JobErrorProcessType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
